﻿CREATE TABLE [dbo].[Comment]
(
	[CommentID] BIGINT IDENTITY(1,1) NOT NULL CONSTRAINT [Comment_Comment_CommentID] PRIMARY KEY, 
	[ApprovedBy] NVARCHAR(250) NULL, 
	[Author] NVARCHAR(250) NOT NULL CONSTRAINT [Comment_Comment_Author] DEFAULT ('UNKNOWN'), 
	[AuthorFlairCssClass] NVARCHAR(250) NOT NULL CONSTRAINT [Comment_Comment_AFCC] DEFAULT ('NONE'), 
	[AuthorFlairText] NVARCHAR(250) NOT NULL CONSTRAINT [Comment_Comment_AFT] DEFAULT ('NONE'), 
	[BannedBy] NVARCHAR(250) NULL, 
	[Body] NVARCHAR(2500) NOT NULL CONSTRAINT [Comment_Comment_Body] DEFAULT ('NONE'), 
	[BodyHTML] NVARCHAR(2500) NOT NULL CONSTRAINT [Comment_Comment_BodyHTML] DEFAULT ('NONE'), 
	[Edited] DATETIME NULL, 
	[Gilded] INT NOT NULL CONSTRAINT [Comment_Comment_Gilded] DEFAULT (0), 
	[Likes] BIT NULL, 
	[LinkID] NVARCHAR(100) NOT NULL CONSTRAINT [Comment_Comment_LinkID] DEFAULT ('UNKNOWN'), 
	[LinkTitle] NVARCHAR(500) NOT NULL CONSTRAINT [Comment_Comment_LinkTitle] DEFAULT ('UNKNOWN'), 
	[NumReports] INT NOT NULL CONSTRAINT [Comment_Comment_NumReports] DEFAULT (0), 
	[ParentID] BIGINT NOT NULL CONSTRAINT [Comment_Comment_ParentID] DEFAULT (0), 
	[ScoreHidden] BIT NOT NULL CONSTRAINT [Comment_Comment_ScoreHidden] DEFAULT ('False'), 
	[Subreddit] NVARCHAR(250) NOT NULL CONSTRAINT [Comment_Comment_Subreddit] DEFAULT ('UNKNOWN'), 
	[SubredditID] NVARCHAR(250) NOT NULL CONSTRAINT [Comment_Comment_SubredditID] DEFAULT ('UNKNOWN'), 
	[Distinguished] BIGINT NOT NULL CONSTRAINT [FK_Comment_TO_Distinguished_ON_DistinguishedID] FOREIGN KEY ([Distinguished]) REFERENCES [Enum].[Distinguished]([DistinguishedID])
)
